home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 1999 May / SGI IRIX Installation Tools & Overlays 1999 May - Disc 2.iso / relnotes / dmedia_dev / ch06.z / ch06
Text File  |  1999-04-19  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        6.  _M_I_D_I__L_i_b_r_a_r_y
  9.  
  10.        This chapter lists information about the MIDI programming
  11.        interface included in the IRIS Digital Media Development
  12.        Environment.  It includes changes, additions, and bug fixes
  13.        since the last release, and known problems and workarounds.
  14.  
  15.  
  16.        The MIDI Library (_l_i_b_m_d._s_o) is a collection of routines for
  17.        performing I/O using the Musical Instrument Digital
  18.        Interface.  _l_i_b_m_d provides a MIDI message-based interface.
  19.        MIDI input is time stamped as differences as well as
  20.        relative to a given time.  MIDI output is also time stamped,
  21.        and the driver can buffer output to be sent over the MIDI
  22.        wire at the correct time.
  23.  
  24.        To use MIDI, you must first install the MIDI STREAMS module
  25.        that sits between the application and the serial port.  Use
  26.        the command _s_t_a_r_t_m_i_d_i to do this.  _s_t_a_r_t_m_i_d_i takes as its
  27.        arguments a name you wish to associate with a device and the
  28.        tty devices you wish to use for MIDI.  For example:
  29.  
  30.        ssssttttaaaarrrrttttmmmmiiiiddddiiii ----nnnn sssseeeerrrriiiiaaaallll2222 ----dddd ////ddddeeeevvvv////ttttttttyyyydddd2222
  31.  
  32.        sets up /dev/ttyd2 as a MIDI port, called "serial2". It does
  33.        not affect /dev/ttyd1.
  34.  
  35.        For additional information about the MIDI Library see the
  36.        overview man page _m_d_I_n_t_r_o(3dm)
  37.  
  38.        6.1  _C_h_a_n_g_e_s
  39.  
  40.           +o The MIDI library has been completely re-implemented for
  41.             release 2.0.  All of the old calls are now obsolete.
  42.  
  43.        6.2  _A_d_d_i_t_i_o_n_s
  44.  
  45.           +o Additional features include, but are not limited to,
  46.             time stamping in musical times (eg ticks per beat),
  47.             built in panic function, 64 bit time stamps and audio
  48.             synchronization features.
  49.  
  50.           +o The IRIX 6.2 and later versions of the MIDI Library
  51.             implement "internal" MIDI ports which can be used to
  52.             transmit MIDI events between IRIX processes.
  53.  
  54.           +o The MIDI programming example programs found in
  55.             /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_m_i_d_i have been revised and
  56.             updated. The MIDI examples include some simple programs
  57.             to demonstrate MIDI input and output, and a simple
  58.             example Standard MIDI File library (included in the
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.             directory /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_l_i_b_m_i_d_i_f_i_l_e).  There
  75.             are programs that demonstrate synchronized recording
  76.             and play back of audio and MIDI files. The source code
  77.             for the standard IRIX 6.2 and later ssssoooouuuunnnnddddppppllllaaaayyyyeeeerrrr((((1111)))) tool
  78.             is included in the /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_s_o_u_n_d_p_l_a_y_e_r
  79.             directory. This tool is capable of playing back
  80.             Standard MIDI Files and a variety of different digital
  81.             audio file formats.
  82.  
  83.  
  84.        6.3  _B_u_g__F_i_x_e_s
  85.  
  86.           +o Output and input are now more reliable.  There can no
  87.             longer be any confusion as to which device a message
  88.             originates from.
  89.  
  90.        6.4  _K_n_o_w_n__P_r_o_b_l_e_m_s__a_n_d__W_o_r_k_a_r_o_u_n_d_s
  91.  
  92.        This section lists some of the known problems with the IDO
  93.        6.4 release of the MIDI library.
  94.  
  95.           +o MIDI Sample Dump has not been rigorously tested on the
  96.             SGI MIDI library, and SGI does not guarantee that it
  97.             will work.
  98.  
  99.           +o Currently, the MIDI system does not automatically
  100.             synchronize to an external sequencer or drum machine,
  101.             nor does it generate MIDI clocks to synchronize other
  102.             devices.
  103.  
  104.             Work around this by adding MIDI clocks to your output
  105.             stream when playing back sequences (if desired).  For
  106.             slaving, examine the time stamps on incoming MIDI
  107.             clocks to calculate tempo.
  108.  
  109.           +o The MIDI library is not multi-thread safe.  Although
  110.             some library calls are safe to do from multiple
  111.             threads, as a rule of thumb one should limit all mdSend
  112.             and mdReceive calls to a single thread in a multi-
  113.             threaded application.  mdPause, mdPanic and mdTell may
  114.             be called from any thread, provided that access to the
  115.             MDport is appropriately semaphored.
  116.  
  117.           +o mdGetTempo retrieves the last tempo set on a port,
  118.             rather than asking the driver what the tempo is.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.